package edu.uaskl.jqf.tools;

public class ArrayTools {

    public static <T> void swapArrayIndex1Index2(final T[] array, final int index1, final int index2) {
        final T temp = array[index1];
        array[index1] = array[index2];
        array[index2] = temp;
    }

    public static void swapArrayIndex1Index2(final int[] array, final int index1, final int index2) {
        final int temp = array[index1];
        array[index1] = array[index2];
        array[index2] = temp;
    }
}
